﻿using Mes.Domain.BoundedContext;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mes.Application.DTO.Inputs.Quality
{
    public class CharacteristicInput
    {
        /// <summary>
        /// 特征名称
        /// </summary>
        public string Char_Name { get; set; }

        /// <summary>
        /// 特征描述
        /// </summary>
        public string? Char_Desc { get; set; }

        /// <summary>
        /// 特征类型 0 计量属性, 1 = 计数属性
        /// </summary>
        public int Type { get; set; } = 0;

        /// <summary>
        /// 单位
        /// </summary>
        public int Uom_Id { get; set; }

        /// <summary>
        /// 默认图 
        /// Type = 0代表计量属性 2 = 均值-极差控制图（xBar-R图）
        ///         3 = 均值-标准差控制图（xBar-S图）
        ///         7 = 中位数-极差控制图（x-R图）
        ///         5  = 单值-移动极差控制图（x-MR图）
        /// Type = 1代表计数属性 16 = P图
        ///         17 = NP图
        ///         18 = U图
        ///         19 = C图
        /// </summary>
        public int Default_Chart { get; set; } = 5;

        /// <summary>
        /// 小数位数
        /// </summary>
        public int Num_Decimals { get; set; } = 0;

        /// <summary>
        /// 标准样本大小
        /// </summary>
        public int Normal_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最小样本大小
        /// </summary>
        public int Minimum_Sample_Size { get; set; } = 1;

        /// <summary>
        /// 最大样本大小
        /// </summary>
        public int? Maximum_Sample_Size { get; set; }

        /// <summary>
        /// 自动收集
        /// </summary>
        public bool Automated_Coll { get; set; } = false;

        /// <summary>
        /// 时间间隔
        /// </summary>
        public int? Time_Interval { get; set; }

        /// <summary>
        /// 时间间隔单位
        /// 0 = seconds, 1 = minutes, 2 = hours
        /// </summary>
        public int? Time_Int_Unit { get; set; }
    }

    public class AddingCharacteristicInput: CharacteristicInput
    { }

    public class UpdatingCharacteristicInput : CharacteristicInput
    {
        /// <summary>
        /// 特征Id
        /// </summary>
        public int Char_Id { get; set; }
    }

    public class GettingCharacteristicsInput
    {
        /// <summary>
        /// 查询关键字
        /// </summary>
        public string? KeyWord { get; set; }

        /// <summary>
        /// 分页参数
        /// </summary>
        public PagedInput PagedInput { get; set; } = new PagedInput();
    }
}
